{extend name="other/public"}
{block name='css'}
<style>
.c1{background:#fff;margin-bottom:15px;box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);justify-content: space-between;}
.c1 span{color: #999;display: inline-block;padding-left:30px;}
.c2{border-bottom:1px solid #f1f1f1;line-height: 40px;}
.c2 .u-flex{justify-content: space-between;color: #999;}
.c2 .u-flex .c4{color: #555;margin-left: 10px;display: inline-block;}

</style>

{/block}
{block name='content'}
  <div class="layui-fluid">
    <blockquote class="layui-elem-quote c1 u-flex">
      <div>
        管理员 : {$adminData['name']} <span>上次登录：{$adminData['login_time']|date='Y-m-d H:i'}</span>
      </div>
      <button type="button" class="layui-btn clear-sql-data">清除数据库缓存</button>
    </blockquote>
    <div class="layui-row layui-col-space15">
      <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
          <div class="layui-card-header">
            产品总数量
            <span class="layui-badge layui-bg-blue layuiadmin-badge">周</span>
          </div>
          <div class="layui-card-body layuiadmin-card-list">
            <p class="layuiadmin-big-font">{$count_product}</p>
            <p>
              总计访问量 
              <span class="layuiadmin-span-color">88万<i class="layui-inline layui-icon layui-icon-flag"></i></span>
            </p>
          </div>
        </div>
      </div>
      <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
          <div class="layui-card-header">
            新闻总数量
            <span class="layui-badge layui-bg-cyan layuiadmin-badge">月</span>
          </div>
          <div class="layui-card-body layuiadmin-card-list">
            <p class="layuiadmin-big-font">{$count_news}</p>
            <p>
              新下载 
              <span class="layuiadmin-span-color">10% <i class="layui-inline layui-icon layui-icon-face-smile-b"></i></span>
            </p>
          </div>
        </div>
      </div>
      <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
          <div class="layui-card-header">
            收入
            <span class="layui-badge layui-bg-green layuiadmin-badge">年</span>
          </div>
          <div class="layui-card-body layuiadmin-card-list">
  
            <p class="layuiadmin-big-font">999,666</p>
            <p>
              总收入 
              <span class="layuiadmin-span-color">*** <i class="layui-inline layui-icon layui-icon-dollar"></i></span>
            </p>
          </div>
        </div>
      </div>
      <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
          <div class="layui-card-header">
            活跃用户
            <span class="layui-badge layui-bg-orange layuiadmin-badge">月</span>
          </div>
          <div class="layui-card-body layuiadmin-card-list">
  
            <p class="layuiadmin-big-font">66,666</p>
            <p>
              最近一个月 
              <span class="layuiadmin-span-color">15% <i class="layui-inline layui-icon layui-icon-user"></i></span>
            </p>
          </div>
        </div>
      </div>  
      <div class="layui-col-md24">
        <div class="layui-row layui-col-space15">


          <div class="layui-col-sm12  layui-col-md8">
            <div class="layui-card">
              <div class="layui-card-header">待办事项</div>
              <div class="layui-card-body">

                <div class="layadmin-backlog">
                  <div>
                    <ul class="layui-row layui-col-space10">
                      <li class="layui-col-xs6  layui-col-sm3">
                        <a lay-href="app/content/comment.html" class="layadmin-backlog-body">
                          <h3>待审评论</h3>
                          <p><cite>66</cite></p>
                        </a>
                      </li>
                      <li class="layui-col-xs6  layui-col-sm3">
                        <a lay-href="app/forum/list.html" class="layadmin-backlog-body">
                          <h3>待审帖子</h3>
                          <p><cite>12</cite></p>
                        </a>
                      </li>
                      <li class="layui-col-xs6  layui-col-sm3">
                        <a lay-href="template/goodslist.html" class="layadmin-backlog-body">
                          <h3>待审商品</h3>
                          <p><cite>99</cite></p>
                        </a>
                      </li>
                      <li class="layui-col-xs6  layui-col-sm3">
                        <a href="javascript:;" onclick="layer.tips('不跳转', this, {tips: 3});" class="layadmin-backlog-body">
                          <h3>待发货</h3>
                          <p><cite>20</cite></p>
                        </a>
                      </li>
                    </ul>
                  </div>
                </div>
              </div>
            </div>
            <div class="layui-card">
              <div class="layui-card-header">管理员操作日志</div>
              <div class="layui-card-body">
                  {volist name="logData" id="vo"}
                    <div class="c2">
                      <div class="u-flex">
                        <div>
                          <!-- <span class="c3">管理员:xxx</span> -->
                          <span class="c4">{$vo.action}</span>
                        </div>
                        <div>
                          {$vo.time|date='Y-m-d H:i'}
                        </div>
                      </div>
                    </div>
                  {/volist}
              </div>
            </div>
          </div>

          <div class="layui-col-sm12  layui-col-md4">
            <div class="layui-card">
              <div class="layui-card-header">系统信息</div>
              <div class="layui-card-body layui-text">
                <table class="layui-table">
                  <colgroup>
                    <col width="150">
                    <col>
                  </colgroup>
                  <tbody>
                    <tr><td>服务器操作系统：</td><td>{$sys_info.os}</td></tr>
                    <tr><td>服务器域名：</td><td>{$sys_info.domain}</td></tr>
                    <tr><td>服务器环境：</td><td>{$sys_info.web_server}</td></tr>
                    <tr><td>PHP 版本：</td><td>{$sys_info.phpv}</td></tr>
                    <tr><td>Mysql 版本：</td><td>{$sys_info.mysql_version}</td></tr>
                    <tr><td>GD 版本：</td><td>{$sys_info.gdinfo}</td></tr>
                    <tr><td>文件上传限制：</td><td>{$sys_info.fileupload}</td></tr>
                    <tr><td>最大占用内存：</td><td>{$sys_info.memory_limit}</td></tr>
                    <tr><td>POST限制：</td><td>{$sys_info.postsize|default='unknown'}</td></tr>
                    <tr><td>最大执行时间：</td><td>{$sys_info.max_ex_time}</td></tr>
                    <tr><td>Zip支持：</td><td>{$sys_info.zip}</td></tr>
                    <tr><td>Zlib支持：</td><td>{$sys_info.zlib}</td></tr>
                  </tbody>
                </table>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
{/block}
{block name='js'}
  <script>
  layui.config({
    base: '../../../static/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index']);

  $(".clear-sql-data").click(function(res){
    $.post("{:url('other/clear_sql_data')}",function(res){
      layer.msg('清理成功')
    })
  })
  </script>
{/block}

